package com.kc.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kc.bean.Classification;
import com.kc.mapper.ClassificationMapper;
import com.kc.service.IClassificationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2019-10-22
 */
@Service
public class ClassificationServiceImpl extends ServiceImpl<ClassificationMapper, Classification> implements IClassificationService {

    @Resource
    private ClassificationMapper classificationMapper;

    @Override
    public int inster(Classification classification) {
        return classificationMapper.insert(classification);
    }

    @Override
    public List<Classification> getClassification(String ClassificationId) {
        return classificationMapper.getClassification(Wrappers.<Classification>lambdaQuery().eq(Classification::getClassificationId,ClassificationId));
    }
}
